package jsyf.oa.entity.task;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

@Entity
@Table(name = "T_SYS_BONUS", schema = "oa", catalog = "")
public class BonusEntity extends BaseEntity implements Serializable {

    private String userId;
    private String day;
    private BigDecimal money;
    private Integer type;
    private String remark;
    private BigDecimal salePunishment;
    private BigDecimal saleReward;
    private String bigRegionId;
    private String companyId;
    private String roleName;
    private BigDecimal saleTargetNum;
    private BigDecimal saleFinishNum;
    private Integer jobState;

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public BigDecimal getSalePunishment() {
        return salePunishment;
    }

    public void setSalePunishment(BigDecimal salePunishment) {
        this.salePunishment = salePunishment;
    }

    public BigDecimal getSaleReward() {
        return saleReward;
    }

    public void setSaleReward(BigDecimal saleReward) {
        this.saleReward = saleReward;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getBigRegionId() {
        return bigRegionId;
    }

    public void setBigRegionId(String bigRegionId) {
        this.bigRegionId = bigRegionId;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public BigDecimal getSaleTargetNum() {
        return saleTargetNum;
    }

    public void setSaleTargetNum(BigDecimal saleTargetNum) {
        this.saleTargetNum = saleTargetNum;
    }

    public BigDecimal getSaleFinishNum() {
        return saleFinishNum;
    }

    public void setSaleFinishNum(BigDecimal saleFinishNum) {
        this.saleFinishNum = saleFinishNum;
    }

    public Integer getJobState() {
        return jobState;
    }

    public void setJobState(Integer jobState) {
        this.jobState = jobState;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("REMARK", getRemark());
        obj.put("DAY", getDay());
        obj.put("MONEY", getMoney());
        obj.put("TYPE", getType());
        obj.put("USER_ID", getUserId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("SALE_REWARD",getSaleReward());
        obj.put("SALE_PUNISHMENT",getSalePunishment());
        obj.put("BIG_REGION_ID",getBigRegionId());
        obj.put("COMPANY_ID",getCompanyId());
        obj.put("ROLE_NAME",getRoleName());
        obj.put("SALE_TARGET_NUM",getSaleTargetNum());
        obj.put("SALE_FINISH_NUM",getSaleFinishNum());
        obj.put("JOB_STATE",getJobState());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_SYS_BONUS";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("REMARK", "remark");
        obj.put("DAY", "day");
        obj.put("MONEY", "money");
        obj.put("TYPE", "type");
        obj.put("USER_ID", "userId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("SALE_REWARD","saleReward");
        obj.put("SALE_PUNISHMENT","salePunishment");
        obj.put("BIG_REGION_ID","bigRegionId");
        obj.put("COMPANY_ID","companyId");
        obj.put("ROLE_NAME","roleName");
        obj.put("SALE_TARGET_NUM", "saleTargetNum");
        obj.put("SALE_FINISH_NUM", "saleFinishNum");
        obj.put("JOB_STATE","jobState");
        return obj;
    }

}
